﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using FundRaising.DAL;
using FundRaising.DAL._FR_DSTableAdapters;

namespace FundRaising.BLL
{
    public class DomainFundBLL
    {
        private DomainFundTableAdapter info = null;
        public DomainFundTableAdapter adapter
        {
            get
            {
                if (info == null) info = new DomainFundTableAdapter();
                return info;
            }
        }


        public DAL._FR_DS.DomainFundDataTable GetDomainByFund(string FundName)
        {
            return adapter.GetDomainByFund(FundName);
        }


       


        public void InsertDomFund(string SerialNum, string DomainName, string FundName)
        {
            FundName = GUI.EditFund2.Proj;
            adapter.InsertDomFund(DomainName, FundName);
        }

        
        public void UpdateDomFund(string DomainName,Guid Original_SerialNum,Guid SerialNum)
        {
            Original_SerialNum = SerialNum;
            adapter.UpdateDomFund(DomainName, Original_SerialNum); 
            
        }

        public void DeleteDomFund(string DomainName, Guid Original_SerialNum, Guid SerialNum)
        {
            Original_SerialNum = SerialNum;
            adapter.DeleteDomFund(Original_SerialNum);
        }
    }
}
